package o;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import o.dky.c;
import o.dky.d;

public class epg extends Drawable {
    float ʻ;
    private int ʼ;
    private Paint ʽ = new Paint();
    float ˊ;
    private int ˊॱ;
    float ˋ;
    float ˎ;
    float ˏ;
    private int ͺ;
    float ॱ;
    private int ॱॱ;
    private int ᐝ;

    public epg(Context context) {
        this.ॱॱ = context.getResources().getDimensionPixelSize(c.ˋˊ);
        this.ͺ = evf.ॱ(context, d.ॱˋ);
        this.ˊॱ = evf.ॱ(context, d.ᐝॱ);
        this.ʽ.setAntiAlias(true);
    }

    public void draw(@NonNull Canvas canvas) {
        this.ʽ.setStyle(Style.STROKE);
        this.ʽ.setStrokeWidth((float) this.ॱॱ);
        this.ʽ.setColor(this.ͺ);
        canvas.drawCircle(this.ˏ, this.ʻ, this.ˏ - (((float) this.ॱॱ) * 0.5f), this.ʽ);
        this.ʽ.setColor(this.ˊॱ);
        Canvas canvas2 = canvas;
        canvas2.drawArc(new RectF(this.ˋ, this.ॱ, this.ˎ, this.ˊ), -90.0f, (((float) this.ᐝ) * 360.0f) / ((float) this.ʼ), false, this.ʽ);
    }

    public int getAlpha() {
        return this.ʽ.getAlpha();
    }

    public void setAlpha(int i) {
        this.ʽ.setAlpha(i);
    }

    public void setColorFilter(@Nullable ColorFilter colorFilter) {
        this.ʽ.setColorFilter(colorFilter);
    }

    public int getOpacity() {
        return -3;
    }

    protected void onBoundsChange(Rect rect) {
        super.onBoundsChange(rect);
        this.ˏ = (float) rect.centerX();
        this.ʻ = (float) rect.centerY();
        this.ॱ = ((float) rect.top) + (((float) this.ॱॱ) * 0.5f);
        this.ˋ = ((float) rect.left) + (((float) this.ॱॱ) * 0.5f);
        this.ˎ = ((float) rect.right) - (((float) this.ॱॱ) * 0.5f);
        this.ˊ = ((float) rect.bottom) - (((float) this.ॱॱ) * 0.5f);
    }

    public void ˋ(int i) {
        if (this.ᐝ != i) {
            this.ᐝ = i;
            invalidateSelf();
        }
    }

    public void ˎ(int i) {
        if (this.ʼ != i) {
            this.ʼ = i;
            invalidateSelf();
        }
    }
}
